using System;
using System.Collections.Generic;
using System.Text;
using HappySprite;
using HappySprite.Graphics;

namespace HappyInvaders
{
    class BombVisual : Visual
    {
        ImageMap bombImage1 = new ImageMap(Constants.BombTexture1);
        ImageMap bombImage2 = new ImageMap(Constants.BombTexture2);

        public BombVisual()
        {
            Item.RenderItem.Width = Constants.BombWidth;
            Item.RenderItem.Height = Constants.BombHeight;
        }

        internal override void OnAdd(View view)
        {
            Item.RenderItem.ImageMap = Global.Random.Next(100) < 85 ? bombImage1 : bombImage2;
        }
    }
}
